package com.boge.core.model.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class User {
    private int userId;
    private String userName;
    private String userMail;
    private String userPassword;
    private Integer userSex;
    private String userPhone;
    private int userType;
    private Integer userQq;
    private String userUUID;
    private Integer userMailActivatedState;
    private Integer userAge;
    private int status;
    private int sysDeptId;

    @Id
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "user_mail")
    public String getUserMail() {
        return userMail;
    }

    public void setUserMail(String userMail) {
        this.userMail = userMail;
    }

    @Basic
    @Column(name = "user_password")
    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    @Basic
    @Column(name = "user_sex")
    public Integer getUserSex() {
        return userSex;
    }

    public void setUserSex(Integer userSex) {
        this.userSex = userSex;
    }

    @Basic
    @Column(name = "user_phone")
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @Basic
    @Column(name = "user_type")
    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    @Basic
    @Column(name = "userQQ")
    public Integer getUserQq() {
        return userQq;
    }

    public void setUserQq(Integer userQq) {
        this.userQq = userQq;
    }

    @Basic
    @Column(name = "userUUID")
    public String getUserUuid() {
        return userUUID;
    }

    public void setUserUuid(String userUUID) {
        this.userUUID = userUUID;
    }

    @Basic
    @Column(name = "user_mail_activated_state")
    public Integer getUserMailActivatedState() {
        return userMailActivatedState;
    }

    public void setUserMailActivatedState(Integer userMailActivatedState) {
        this.userMailActivatedState = userMailActivatedState;
    }

    @Basic
    @Column(name = "user_age")
    public Integer getUserAge() {
        return userAge;
    }

    public void setUserAge(Integer userAge) {
        this.userAge = userAge;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "sys_dept_id")
    public int getSysDeptId() {
        return sysDeptId;
    }

    public void setSysDeptId(int sysDeptId) {
        this.sysDeptId = sysDeptId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        User user = (User) o;

        if (userId != user.userId) return false;
        if (userType != user.userType) return false;
        if (status != user.status) return false;
        if (sysDeptId != user.sysDeptId) return false;
        if (userName != null ? !userName.equals(user.userName) : user.userName != null) return false;
        if (userMail != null ? !userMail.equals(user.userMail) : user.userMail != null) return false;
        if (userPassword != null ? !userPassword.equals(user.userPassword) : user.userPassword != null) return false;
        if (userSex != null ? !userSex.equals(user.userSex) : user.userSex != null) return false;
        if (userPhone != null ? !userPhone.equals(user.userPhone) : user.userPhone != null) return false;
        if (userQq != null ? !userQq.equals(user.userQq) : user.userQq != null) return false;
        if (userUUID != null ? !userUUID.equals(user.userUUID) : user.userUUID != null) return false;
        if (userMailActivatedState != null ? !userMailActivatedState.equals(user.userMailActivatedState) : user.userMailActivatedState != null)
            return false;
        if (userAge != null ? !userAge.equals(user.userAge) : user.userAge != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = userId;
        result = 31 * result + (userName != null ? userName.hashCode() : 0);
        result = 31 * result + (userMail != null ? userMail.hashCode() : 0);
        result = 31 * result + (userPassword != null ? userPassword.hashCode() : 0);
        result = 31 * result + (userSex != null ? userSex.hashCode() : 0);
        result = 31 * result + (userPhone != null ? userPhone.hashCode() : 0);
        result = 31 * result + userType;
        result = 31 * result + (userQq != null ? userQq.hashCode() : 0);
        result = 31 * result + (userUUID != null ? userUUID.hashCode() : 0);
        result = 31 * result + (userMailActivatedState != null ? userMailActivatedState.hashCode() : 0);
        result = 31 * result + (userAge != null ? userAge.hashCode() : 0);
        result = 31 * result + status;
        result = 31 * result + sysDeptId;
        return result;
    }
}
